package math;

/**
 * 取整购买后的账户余额 -2806
 */
public class 取整购买后的账户余额 {
    public int accountBalanceAfterPurchase(int purchaseAmount) {
        int t = purchaseAmount / 10;
        if (purchaseAmount % 10 >= 5) {
            t++;
        }
        return 100 - t * 10;
    }

    public static void main(String[] args) {
        System.out.println(new 取整购买后的账户余额().accountBalanceAfterPurchase(15));
    }
}
